Release 10.1A: OpenEdge Development:
Progress Dynamics Advanced Development
Using launch.i or dynlaunch.i to run the PLIP
Next comes the key part of the exercise: running the business logic procedure that is located where the data is, which will return the needed
Creditvalue. The standard Progress Dynamics include file,launch.i,takes a series of named arguments that is explained in OpenEdge Development: Progress Dynamics Basic Development . In this example, it runs the internal procedureAvailCreditin the persistent procedure customerplip.p, passing it the parameter list specified, deleting the running instance of customerplip.p when it is done, as shown:
There is now a new alternative to
launch.ithat is more efficient in cases where you do not need to retain the procedure handle of the business logic procedure after your request has returned. This include file isdynlaunch.i, and it takes advantage of the dynamicCALLobject to carry out the entire request in a single AppServer call, running code on the server that starts the PLIP if it is not already running, runs the requested internal procedure, passes in anyINPUTparameters, receives back anyOUTPUTparameters, and deletes the PLIP if it was started by the call.The
dynlaunch.ifile uses essentially the same named arguments aslaunch.i, except thatINPUTandOUTPUTparameters are expressed as named arguments rather than as a single quoted string. This is because the arguments are actually evaluated on the server dynamically using aCALLobject to construct the call at run time. For each parameter to the internal procedure you are running, you must specify three named include file arguments. In each case, n represents the position of the parameter in the calling sequence:Also, because the handle of the server-side procedure cannot be made available to the client after the call is complete, the
&AutoKilland&Permarguments do not apply. A call todynlaunch.ito accomplish the same request as the previous call tolaunch.ilooks like this:
If you use
dynlaunch.i, you must also include this reference in the Definitions section of your procedure so that the variables it uses are properly defined, as shown:
Next comes the standard error checking include file,
checkerr.i, which is described in OpenEdge Development: Progress Dynamics Basic Development , as shown:
These arguments mean that an error will be displayed if there is one (because the code is being executed on the client, where the error dialog box can be displayed). The code will return out of the procedure if there is an error, but will not pass a specific error condition to its caller.
The code locates the dynamic fill-in
AvailCreditin the viewer, and sets itsSCREEN-VALUE,as shown:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |